import React, { Component } from 'react';
import {
	StyleSheet, Text, View, Image, ScrollView, PixelRatio, TouchableOpacity, Alert
} from "react-native";
import { GLOBAL } from '../../../../config/global';
import { style } from '../../../../theme/style';
import { PageStatusIndex } from '../../../../component/page-status/PageStatusIndex';
import { CURRENCY } from '../../../../utils/helper';
import Dictionary from '../../../../utils/dictionary';
import ToastUtil from '../../../../utils/toast';
import StorageHelper from '../../../../utils/storageHelper'
import { STORAGE_CONSTANT } from '../../../../config/storage';
import { RefuseModal } from '../../../../component/ModalVerifylComponent.js';
import navigationSeevice from '../../../../components/navigation/navigationSeevice';
import ModalPicDelComponent from '../../../../component/ModalPicDelComponent';
import { orderStyle, commonStyle, commen } from '../_common/style';
import { BockCpt } from '../_components/BockCpt';
import { LieCpt } from '../_components/LieCpt';
import { SetpCpt } from '../_components/SetpCpt';
import { GoodsCpt } from '../_components/GoodsCpt';
import { BouncedCpt } from '../../_components/BouncedCpt';
import { BodyCpt } from '../../_components/BodyCpt';
import OrderDetailsService from '../_common/service';
import { OrderCommon } from '../../_common/common';
import moment from 'moment';
import MethodUtil from '../../../../utils/MethodUtil';
import Utils from '../../../../utils/utils.js';
import HTTP from '../../../../utils/http';
import { API, API_GENERATE } from '../../../../config/api';

const scale = GLOBAL.SCALE;
const modalPicDelCfg = {
	visible: false,
	uri: null,
	delPress: () => { },
	picPress: () => { }
}

export class OrderBaseInfoComponent extends Component {
	static navigationOptions = {
		header: null
	}

	constructor(props) {
		super(props);
		console.log('基本信息-props', props)
		let { data, orderData } = this.props || {};
		let { orderType, orderId, tCode } = data || {};
		this.propsSend = { orderType, orderId, tCode };
		this.state = {
			status: 'loading',
			data: null,
			showRejectModal: false, // 驳回弹窗
			isDetailsVisible: false,
		}
		this.PageText = {} // 标题 采销之分
		this.planList = []; // 交货计划 - 数据
		this.feeList = [];// 预估费用 - 数据
		this.payTypeArrNew = []; // 支付信息
		this.btnCs = false;//撤销按钮
		this.btnRemove = false; // 删除按钮
		this.btnZf = false;// 作废
		this.btnSubmit = false; //提交
		this.detailsDataAll = {};  // 详情全的参数
		this.orderFlag = {};
		this.priceData = {};
		// 文档
		modalPicDelCfg.picPress = () => {
			modalPicDelCfg.visible = false;
			modalPicDelCfg.uri = null;
			this.setState({
				previewModalVisible: false,
			});
		}
	}

	async componentWillMount() {
		this._init();
	}

	componentWillUnmount() {

	}

	//初始化标题
	_initPageText = () => {
		if (this.propsSend.orderType === 'P') {
			this.PageText.companyName = '供应商';
			this.PageText.payType = '付款类型';
			this.PageText.payMethod = '付款方式';
			this.PageText.title = '采购信息';
		} else {
			this.PageText.companyName = '客户';
			this.PageText.payType = '收款类型';
			this.PageText.payMethod = '收款方式';
			this.PageText.title = '销售信息';
		}
	}


	//初始函数
	_init = async () => {
		this._initPageText();
		await this._resultId();
		this._getData();
	}

	//添加个人信息
	_resultId = async () => {
		let userInfo = await StorageHelper.get(STORAGE_CONSTANT.USER_INFO_KEY);
		if (userInfo) {
			userInfo = JSON.parse(userInfo);
			this.userId = userInfo.userId;
		}
	}

	//_ 初始数据
	_getData = async () => {
		let { data, orderData } = this.props || {};
		let { tCode } = this.propsSend
		let baseData = orderData;
		if (baseData) {
			let { orderId } = baseData;
			this.propsSend.logisticsPrice = baseData.logisticsPrice;
			await this._dataZl(baseData);
			this.setState({
				data: baseData,
				status: 'data',
				wOrder: baseData.zxyOrderId && baseData.orderStepFlag == '3'
			})
			let url = tCode == 'C' ? API.FIND_ORDER_C : (tCode == 'E' || tCode == 'QH' ? API.FIND_ORDER_E : API.FIND_ORDER)
			let sendData = await HTTP.POST(API_GENERATE(url), { orderId });
			let responseData = await HTTP.POST(API_GENERATE(API.NEW_ORDER_SHOW_PRICE), sendData);
			this.priceData = responseData
		} else {
			this.setState({
				status: 'empty',
			});

		}
	}

	// 数据处理
	_dataZl = (baseData) => {
		//交货计划
		baseData.orderDeliveryPlanList && baseData.orderDeliveryPlanList.forEach((item) => {
			this.planList.push({ lable: '数量', value: [[`${item.quantity}吨`, `${moment(item.deliveryBeginDate).format("YYYY/MM/DD")}-${moment(item.deliveryEndDate).format("YYYY/MM/DD")}`]] })
		});

		//费用数据
		baseData.orderFeeList && baseData.orderFeeList.forEach((item) => {
			//{ lable: '港口费', value: [['100']] },
			this.feeList.push({ lable: item.feeTypeName, value: [[item.feeAmt]] })
		});

		//支付信息
		this._payInit(baseData);

		//状态初始化
		this._getStatus(baseData.status)

		//是否是泉化
		this.propsSend.isQhXhXsBiz = baseData.isQhXhXsBiz;
	}

	// 支付 
	_payInit = async (data) => {
		//付款类型
		this.inPayTypeData = await Dictionary.get('EC_PAY_TYPE'); // 付款类型
		this.QHPayTypeData = await Dictionary.get('EC_QH_PAY_TYPE');// 泉化-付款类型
		if (this.propsSend.tCode === 'QH') {
			this.payTypeData = this.QHPayTypeData;
		} else {
			this.payTypeData = this.inPayTypeData;
		}
		console.log('支付数据字典', this.payTypeData, data)
		//付款类型初始化
		this.payTypeData.forEach((item, indexKey) => {
			if (data && item.dictKey == data.payType) {
				this.payTypeArr = this.payTypeData[indexKey] && this.payTypeData[indexKey].comments ? eval(this.payTypeData[indexKey].comments) : [];
			}
		})
		this.payTypeArr && this.payTypeArr.forEach((item) => {
			let value = data[item.name];
			if (!Utils.isEmpty(value)) {
				if (item.name === "prepayAmtBalanceDate") {
					value = moment(value).format('YYYY-MM-DD');
				}
				let str = item.title + value + item.text;
				this.payTypeArrNew.push(str);
			}
		})
		if (data.deliveryExpireDays || data.deliveryExpireDays == 0) {
			this.payTypeArrNew.push(`${this.propsSend.orderType == 'P' ? '预付' : '赊销'}(授信)账期${data.deliveryExpireDays}天`)
		}
		if (data.fundCreditFee || data.fundCreditFee == 0) {
			this.payTypeArrNew.push(`资金(授信)${data.fundCreditFee}元/吨`)
		}
		if (data.fundVoucherFee || data.fundVoucherFee == 0) {
			this.payTypeArrNew.push(`资金(票据)${data.fundVoucherFee}元/吨`)
		}
		if (data.voucherExpireDays || data.voucherExpireDays == 0) {
			this.payTypeArrNew.push(`票据期限${data.voucherExpireDays}天`)
		}

	}


	// 基本信息模版
	_viewBase = (sendData, index) => {
		return (
			<LieCpt data={sendData} key={index} />
		)
	}

	//状态
	_getStatus = (sendStatus) => {
		// RPT_DRAFT   成交报告草稿
		// RPT_AUDITING  成交报告审批中
		// RPT_ADUIT_UNPASS  成交报告审批驳回
		// RPT_ADUIT_PASS  成交报告审批通过
		// WAIT_CONFIRM    待业务员确认
		// WAIT_AUDIT 待审核
		// WAIT_SIGN  待签章
		// SINGLE_SIGNED 一方已签章
		// DOUBLE_SIGNED 双方已签章
		// EXECUTING 执行中
		// COMPLETED 订单完成
		// ABANDONED 废弃
		// COLL_GO  收货完成
		// DLVR_GO  发货完成
		//"ABANDONED"
		let btnCsArr = ['RPT_AUDITING', 'RPT_AUDIT_PASS', 'WAIT_CONFIRM', 'WAIT_AUDIT', 'WAIT_SIGN', 'AUDIT_UNPASS', 'PRE_AUDIT'] // 撤销
		let btnZfArr = ['EXECUTING']; // 作废 泉化 作废审批流程
		let btnSubmitArr = ['RPT_AUDIT_UNPASS', 'RPT_DRAFT']; //重新提交
		let btnRemoveArr = ['RPT_DRAFT', 'RPT_AUDIT_UNPASS']; // 删除  RPT_DRAFT - RPT_AUDIT_UNPASS
		btnCsArr && btnCsArr.forEach(item => {
			if (sendStatus == item) {
				this.btnCs = true;
			}
		})
		btnRemoveArr && btnRemoveArr.forEach(item => {
			if (sendStatus == item) {
				this.btnRemove = true;
			}
		})
		btnZfArr && btnZfArr.forEach(item => {
			console.log('111111', item, sendStatus, sendStatus == item)
			if (sendStatus == item) {
				this.btnZf = true;
			}
		})
		btnSubmitArr && btnSubmitArr.forEach(item => {
			if (sendStatus == item) {
				this.btnSubmit = true;
			}
		})

	}

	// 撤销本单
	_fetchApproval = async (bidId) => {
		if (this.requesting) return;
		this.setState({
			refuseModalVisible: false,
			loaded: true
		});
		this.requesting = true;
		let responseData = await OrderDetailsService.cancelOrder({ businessKey: this.propsSend.orderId, bidId });
		this.setState({
			loaded: false
		});
		if (responseData) {
			ToastUtil.showSuccess('撤销本单成功').then(() => {
				navigationSeevice.goBack();
			})
		} else {
			this.requesting = false;
		}
	}

	//删除本单
	_removeFn = async () => {
		console.log('this.requesting', this.requesting)
		if (this.requesting) return;
		this.setState({
			refuseModalVisible: false,
			loaded: true
		});
		this.requesting = true;
		let responseData = await OrderDetailsService.removeOrder({ orderId: this.propsSend.orderId });
		this.setState({
			loaded: false
		});
		if (responseData) {
			ToastUtil.showSuccess('删除本单成功').then(() => {
				navigationSeevice.goBack();
			})
		} else {
			this.requesting = false;
		}
	}

	_rejectConfirm = async (remark) => {
		if (remark) {
			this._obsoleteOrder(remark);
		} else {
			Alert.alert('请输入作废原因')
		}
	}

	//申请作废订单
	_obsoleteOrder = async (remark) => {
		if (this.requesting) return;
		this.setState({
			refuseModalVisible: false,
			loaded: true,
			showRejectModal: false,
		});
		this.requesting = true;
		let responseData = await OrderDetailsService.verbOrder({
			orderId: this.propsSend.orderId,
			remark,
		});

		this.setState({
			loaded: false
		});

		if (responseData) {
			ToastUtil.showSuccess('已申请作废').then(() => {
				navigationSeevice.goBack();
			})
		} else {
			this.requesting = false;
		}
	}

	// 查看长约框架
	_findLongFrame = (sendData) => {
		let newsendData = JSON.stringify(sendData);
		newsendData = JSON.parse(newsendData);
		if (newsendData && newsendData.pramasData) {
			newsendData.pramasData.orderId = newsendData.pramasData.longOrderId;
		}
		navigationSeevice.navigate('LongOrderDetailPage', newsendData)
	}

	// 查看新油
	_findXy = (sendData) => {
		if (!sendData || !sendData.pramasData) return;
		navigationSeevice.navigate('SinoNewOrderDetailPage', {
			paramsData: {
				orderId: sendData.pramasData.zxyOrderId,
				orderType: sendData.orderType == 'P' ? 'S' : 'P',
				bizMode: sendData.pramasData.bizMode,
				status: sendData.pramasData.status,
				statusName: sendData.pramasData.statusName,
			}
		})
	}

	//查看合同
	_findContract = (finalFileId) => {
		navigationSeevice.navigate('ContractPdfPage', { finalFileId, title: '合同信息' });
	}

	// 关联(采/销)详情
	_findBackToBack = (sendData) => {
		let { orderType, orderId } = sendData;
		navigationSeevice.reset('OrderDetailsPage',
			{ orderType, orderId, tCode: 'C' },
			[{ routeName: 'OrderListPage', params: { typeIndex: 0 } }]);
	}

	//意向转单详情
	_findTurn = (sendData) => {
		console.log('sendData-99999999', sendData)
		navigationSeevice.navigate('TurnOrderInfo', sendData);
	}

	//获取基本信息
	_getInfoBase = (sendDate) => {
		let { choice } = this.props || {};
		console.log('sendDate-99999-0000', sendDate)
		let { isUniteName, companyName, contractInfo, orderType, longOrderId, oppoOrderInfo, zxyOrderId, bizStaffName, bizTeamName, bizOrganName, bidPackageId, bidId, tranReportType, bizStaffId, organName, corpName } = sendDate || {};
		let infoBase = [
			{ lable: this.PageText.companyName, value: [[companyName]] }
		];
		bizOrganName = bizOrganName || '-';
		//意向转单的资源包id
		if (bidPackageId) {
			infoBase.push({ lable: '资源包id', value: [[bidPackageId]], isCallBack: true, itemCallBack: () => { this._findTurn({ bidId, tranReportType, bizStaffId, orderType }) } })
		}
		//业务类型
		if (this.propsSend.tCode != 'C') {
			infoBase.push({ lable: '业务类型', value: [[isUniteName]] })
		}
		// 合同附件
		if (contractInfo && contractInfo.finalFileId) {
			infoBase.push({ lable: '合同附件', value: [['[查看合同]']], isCallBack: true, itemCallBack: () => { this._findContract(contractInfo.finalFileId) } })
		}
		//长约框架
		if ((this.propsSend.tCode == 'E' || this.propsSend.tCode == 'QH') && longOrderId) {
			infoBase.push({ lable: '长约框架', value: [['[查看框架]']], isCallBack: true, itemCallBack: () => { this._findLongFrame({ pramasData: sendDate, orderType }) } })
		}
		//关联采购
		if (this.propsSend.tCode == 'C' && oppoOrderInfo && oppoOrderInfo.orderId) {
			infoBase.push({ lable: `关联${this.propsSend.orderType == 'S' ? '采购' : '销售'}`, value: [[`[查看${this.propsSend.orderType == 'S' ? '采购' : '销售'}]`, oppoOrderInfo.companyName]], isCallBack: true, itemCallBack: () => { this._findBackToBack(oppoOrderInfo) } })
		}
		//zxyOrderId
		if (zxyOrderId) {
			infoBase.push({ lable: '关联新油报告', value: [['[查看报告]', '中化石化销售有限公司']], isCallBack: true, itemCallBack: () => { this._findXy({ pramasData: sendDate, orderType }) } })
		}
		if (bizStaffName && bizTeamName && bizOrganName) {
			infoBase.push({
				lable: '业务员名称', value: [[bizStaffName || bizTeamName || bizOrganName ?
					`${bizStaffName || '--'}|${bizTeamName || '--'}|${bizOrganName}` : '--']]
			})
		}
		if (organName) {
			infoBase.push({ lable: '订单部门', value: [[organName]] })
		}
		infoBase.push({ lable: '业务组织', value: [[corpName || '--']] })
		console.log('_getInfoBase', infoBase)
		return infoBase;
	}

	//获取运输信息
	_getYun = (sendDate) => {
		let { logisticsPrice, saleDeliveryTypeName, purchaseDeliveryTypeName, transportTypeName, srcAddress,
			destAddress, lostRate, lostRenderName, contractStandard, currency, logisticsFee } = sendDate || {};
		let yunBase = [];
		let smallArr = [this.propsSend.orderType == 'S' ? saleDeliveryTypeName : purchaseDeliveryTypeName];

		if (transportTypeName) {
			smallArr.push(transportTypeName)
		}
		if (logisticsFee || logisticsFee == 0) {
			smallArr.push(`运费成本${logisticsFee}${CURRENCY.getUnit(currency).text}`)
		}
		if (logisticsPrice) {
			smallArr.push(`额外运费${logisticsPrice}${CURRENCY.getUnit(currency).text}`)
		}
		if (lostRenderName) {
			smallArr.push(`${lostRenderName}承损`)
		}
		if (lostRate) {
			smallArr.push(`千分之${MethodUtil.countObj.multiply(lostRate, 1000)}(途损率) ${contractStandard == '1' ? '标准' : '非标'}`)
		}

		//交货方式
		yunBase.push({ lable: '交货方式', value: [smallArr] })
		//出库地
		if (srcAddress) {
			yunBase.push({ lable: '出库地', value: [[srcAddress]] })
		}
		//目的地
		if (destAddress) {
			yunBase.push({ lable: '目的地', value: [[destAddress]] })
		}
		return yunBase;
	}

	//支付信息
	_getPay = (sendDate) => {
		let { payStyleName, payTypeName, outOrderPayMethodList, fundCreditFee, fundVoucherFee, voucherExpireDays } = sendDate || {};
		// if (payTypeName) {
		// 	this.payTypeArrNew.unshift(payTypeName);
		// }
		// if (payStyleName) {
		// 	this.payTypeArrNew.unshift(payStyleName);
		// }
		let payData = [{ lable: this.PageText.payType, value: [[payTypeName, payStyleName], this.payTypeArrNew] }]
		let { orderType } = this.propsSend || {};
		if (outOrderPayMethodList) {
			payData = [];
			outOrderPayMethodList.forEach((element) => {
				payData.push({ lable: this.PageText.payType, value: [[element.payMethodName]] });
				payData.push({ lable: orderType === 'S' ? '收款比例' : '付款比例', value: [[MethodUtil.countObj.multiply(element.prepayRate, 100) + '%']] });
				payData.push({ lable: orderType === 'S' ? '收款期限' : '付款期限', value: [[element.payExpireDays]] });
			});
		}
		return payData;
	}

	_hideDetialsTwo = (boolean, detaisData) => {
		this.detailsDataAll = detaisData;
		this.detaisData =
			this.setState({
				isDetailsVisible: boolean
			})
	}
	render() {
		let { status, data, showRejectModal, lightBoxData, wOrder, isDetailsVisible } = this.state || {};
		let { orderItemList, orderId, totalOrderAmt, totalOrderQuantity, currency,
			analyseProfit, statusName, bizStaffId, qhCancelFlag,
			tradeType, bidId } = data || {};
		let { choice } = this.props || {};
		this.orderFlag = {
			tCode: this.propsSend.tCode,
			orderType: this.propsSend.orderType,
			bidId,
		}
		console.log('基本信息-page', data)
		let infoBase = this._getInfoBase(data);
		let yunData = this._getYun(data);
		let payData = this._getPay(data);
		return (
			<View style={orderStyle.container}>

				{
					data ? (<View style={orderStyle.scollBox}>
						<View style={orderStyle.showBox}>
							<View style={commonStyle.row2}>
								<Text style={commonStyle.fontTitle}>订单号 {orderId}</Text>
								<Text style={styles.orderStatus}>{statusName}</Text>
							</View>
							<View style={[commonStyle.row2, styles.orderBtnBox]}>
								<View style={commonStyle.row}>
									<Image style={styles.icoImg} source={OrderCommon._showIcon(this.propsSend.tCode)} />
									<Image style={styles.icoImg} source={tradeType == 'I' ? OrderCommon.iconData.innerImg : OrderCommon.iconData.outerImg} />
									{data.isQhXhXsBiz == 'Y' ? <Image source={OrderCommon.iconData.quanHuaImg} style={styles.icoImg} /> : null}
									{data.bidId ? <View style={styles.costTableRed}><Text style={{ fontSize: 12, color: '#FFF' }}>壹化</Text></View> : null}
								</View>
								<View style={commonStyle.row}>
									{/* btnCs, btnRemove, btnZf, btnSubmit */}
									{this.btnCs && bizStaffId == this.userId ? (
										<TouchableOpacity onPress={() => {
											Alert.alert('提示', '您确定要撤销本单吗？', [
												{ text: '取消', }, {
													text: '确定',
													onPress: () => {
														this._fetchApproval(bidId);
													}
												}
											]);
										}}>
											<Text style={[styles.btnBox, styles.cx]}>撤销</Text>
										</TouchableOpacity>
									) : null}
									{this.propsSend.isQhXhXsBiz == 'Y' && qhCancelFlag == 1 && this.btnZf && bizStaffId == this.userId ?
										(
											<TouchableOpacity onPress={() => {
												this.setState({
													showRejectModal: true
												})
											}}>
												<Text style={[styles.btnBox, styles.cx]}>作废</Text>
											</TouchableOpacity>
										)
										: null}
									{/* bidId 意向转单 不支持 重新提交  功能 */}
									{
										!bidId && this.btnSubmit && bizStaffId == this.userId ? <Text onPress={() => { navigationSeevice.navigate('orderBasePage', { ...this.propsSend }) }} style={[styles.btnBox, styles.newSubmit]}>重新提交</Text> : null
									}
									{(this.btnRemove && bizStaffId == this.userId) ? <TouchableOpacity onPress={() => {
										Alert.alert('提示', '您确定要删除本单吗？', [
											{ text: '取消', }, {
												text: '确定',
												onPress: () => {
													this._removeFn();
												}
											}
										]);
									}}>
										<Image source={OrderCommon.iconData.removeImg} style={styles.removeStyle} />
									</TouchableOpacity> : null
									}
								</View>
							</View>
							{
								bidId && data.status == 'RPT_AUDIT_UNPASS' && <Text style={styles.bidText}>(*意向转单审批驳回不支持重新提交，请从意向转单重新提交)</Text>
							}
							{
								bidId && data.status == 'RPT_DRAFT' && <Text style={styles.bidText}>(*意向转单撤销草稿仅支持删除，重新提交请在意向转单发起)</Text>
							}
							<SetpCpt data={data} choice={choice || {}} />
						</View>

						<ScrollView style={[orderStyle.body]}>
							<View>
								<BockCpt data={{
									title: `${this.PageText.title}`,
									listData: infoBase,
								}} renderView={this._viewBase} />
								<ModalPicDelComponent {...modalPicDelCfg} />
								<BockCpt data={{
									title: '支付信息',
									listData: wOrder ? null : payData
								}} renderView={this._viewBase} />
								<BockCpt data={{
									title: '运输信息',
									listData: wOrder ? null : yunData
								}} renderView={this._viewBase} />
								<BockCpt data={{
									title: '交货计划',
									listData: this.planList
								}} renderView={this._viewBase} />
								<BockCpt data={{
									title: '费用预估(元)',
									listData: this.feeList
								}} renderView={this._viewBase} />
								{
									orderItemList && orderItemList.map((item, index) => {
										return <GoodsCpt key={index} data={{ goodsData: item, flagData: this.propsSend, currency, orderData: data }} />
									})
								}
							</View>
							<BouncedCpt isVisible={isDetailsVisible} closeFn={() => { this._hideDetialsTwo(false) }} data={{
								renderBody: <BodyCpt data={{ bidId: bidId ? true : false, detailsDataAll: this.detailsDataAll, orderFlag: this.orderFlag, priceData: this.priceData }} closeFn={() => { this._hideDetialsTwo(false) }} />
							}} />
						</ScrollView>
						<TouchableOpacity style={styles.goodsZongBox} onPress={() => {
							this.setState({
								isDetailsVisible: true
							})
						}}>
							<View style={{ flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center', marginBottom: 5, marginRight: 20 * scale }}>
								<Text style={styles.goodsPriceType}>
									合计: <Text style={{ fontSize: 12 }}>¥{totalOrderAmt == null ? '--' : totalOrderAmt}万元</Text>
								</Text>
								<Text style={[styles.goodsPriceType, { fontSize: 10 }]}>价格明细</Text>
								<Image style={styles.more} source={require('../../../../imgs/global/down.png')} />
							</View>
							<Text style={[styles.goodsZong, { marginRight: 20 * scale }]}>{`商品${orderItemList && orderItemList.length || '0'}件  总量 ${totalOrderQuantity == null ? '--' : totalOrderQuantity}吨`}</Text>
						</TouchableOpacity>


						<RefuseModal visible={showRejectModal}
							placeholderText={'请输入作废原因'}
							titleText={'作废原因'}
							maxLength={500}
							btnPress={(text) => {
								this._rejectConfirm(text);
							}}
							bgPress={() => {
								this.setState({
									showRejectModal: false,
								});
							}} />

					</View>) : <PageStatusIndex status={status} />
				}



			</View >
		)
	}
}


const styles = StyleSheet.create({
	orderStatus: {
		color: style.color.fontRed1,
		fontSize: 14 * scale,
	},
	orderBtnBox: {
		paddingTop: 15 * scale,
		paddingBottom: 15 * scale
	},
	icoImg: {
		width: 20 * scale,
		height: 20 * scale,
		marginRight: 5 * scale
	},
	btnBg1: {
		backgroundColor: '#0C88FB'
	},
	btnBg2: {
		backgroundColor: '#0CC9FB'
	},
	stepTitle: {
		fontSize: 13 * scale,
		color: style.color.font1,
	},

	goodsZong: {
		fontSize: 14 * scale,
		color: style.color.font1,
		textAlign: 'right',
		fontSize: 11
	},
	goodsZongBox: {
		marginTop: 20 * scale
	},
	btnBox: {
		width: 80 * scale,
		height: 23 * scale,
		lineHeight: 23 * scale,
		textAlign: 'center',
		borderRadius: 4 * scale,
		overflow: 'hidden',
		color: '#fff',
		marginLeft: 5 * scale
	},
	cx: {
		backgroundColor: style.color.fontRed1
	},
	newSubmit: {
		backgroundColor: style.color.themeColor
	},
	goodsPriceType: {
		color: style.color.fontRed1,
		fontSize: 14 * scale,
		marginLeft: 4 * scale,
		fontSize: 11

	},
	removeStyle: {
		width: 18 * scale, height: 22 * scale, marginLeft: 5 * scale
	},
	bidText: {
		fontSize: 11 * scale,
		color: style.color.fontRed1,
		width: '100%',
		textAlign: 'right'
	},
	more: {
		width: 13 * scale,
		height: 7 * scale,
		tintColor: style.color.orange,
		marginLeft: 5,
		transform: [{ rotateX: '180deg' }]
	},
	costTableRed: {
		borderRadius: 2 * scale,
		paddingHorizontal: 4 * scale,
		paddingVertical: 3 * scale,
		marginLeft: 5 * scale,
		backgroundColor: '#E02020'
	}
})